const {
	defineConfig
} = require('@vue/cli-service')
module.exports = defineConfig({
	transpileDependencies: true,
	lintOnSave: false, //关闭语法检查
	//开启代理服务器(方式2)
	devServer: {
		proxy: {
			'/axios': {
				target: 'http://localhost:8888',
				//去除api标识
				pathRewrite: {
					'^/axios': 'axios'
				},
				//ws: true,//用于支持websocket
				changeOrigin: true, //用于控制请求头中host值
				client: {
					webSocketURL: 'ws://0.0.0.0:6103/ws',
				},
				headers: {
				'Access-Control-Allow-Origin': '*',
				}
			}
			
			/* '/foo': {
			  target: '<other_url>'
			} */
		}
	}
})
